<template>
  <h3>Home</h3>
  <button @click="goToAbout">Go to About</button>
  <h3>2 + 3 = {{count}}</h3>
  <h3>store: {{store.name}}</h3>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { ref } from 'vue'
import { useCounterStore } from '@/store'

const count = ref(0)

const router = useRouter()
const store = useCounterStore()

const goToAbout = () => {
  router.push('/about');
}

window.api.module('add')
  .then(fn => {
    count.value = fn(2, 3)
  })
window.api.module('subtract')
.then(fn => {
  console.log(fn(3, 2))
})
</script>

<style lang="scss" scoped>
  
</style>